<!doctype html public "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<html>
<head>
<title>
ka-Map Overview
</title>
<link rel ="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script>
function asd() {
	
		parent.document.title="kaZoomer.js Overview";
	
}
</script>
</head>
<body bgcolor="white" onload="asd();">

<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
  <tr align="center" valign="top">
  
  
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
  <td bgcolor="#FFFFFF" class="NavBarCell1Rev">	&nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
  

  <td bgcolor="#FFFFFF" class="NavBarCell1"> 	<font class="NavBarFont1">Class</font>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
  </tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top">
<em>
<b>ka-Map</b></em>
</td>
</tr>

<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
  <a href="index.html" target="_top"><b>FRAMES</b></a>  &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->

<hr>
<center>
	
	   <h2>kaZoomer.js</h2>
	
</center>

	


<h4>Summary</h4>
<p>
	
		No overview generated for 'kaZoomer.js'<BR/><BR/>
	
</p>

<hr>



<!-- ========== METHOD SUMMARY =========== -->

	<a name="method_summary"><!-- --></a>
	<table border="1" cellpadding="3" cellspacing="0" width="100%">
		<tr bgcolor="#CCCCFF" class="TableHeadingColor">
			<td colspan=2>
				<font size="+2">
					<b>Method Summary</b>
				</font>
			</td>
		</tr>
	
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;void</code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!kaZoomer">kaZoomer</a></b>(oKaMap)
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 kaZoomer


		      </td>
		   </tr>
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;void</code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!kaZoomer_alert">kaZoomer_alert</a></b>()
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 
		      </td>
		   </tr>
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;void</code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!kaZoomer_draw">kaZoomer_draw</a></b>()
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 
		      </td>
		   </tr>
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;void</code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!kaZoomer_DropFunc">kaZoomer_DropFunc</a></b>()
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 
		      </td>
		   </tr>
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;void</code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!kaZoomer_onmouseout">kaZoomer_onmouseout</a></b>( e )
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 
		      </td>
		   </tr>
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;void</code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!kaZoomer_onmouseover">kaZoomer_onmouseover</a></b>( e )
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 
		      </td>
		   </tr>
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;void</code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!kaZoomer_setPosition">kaZoomer_setPosition</a></b>( left, top, right, bottom )
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 
		      </td>
		   </tr>
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;void</code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!kaZoomer_update">kaZoomer_update</a></b>()
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 
		      </td>
		   </tr>
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;void</code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!kaZoomer_zoomIn">kaZoomer_zoomIn</a></b>()
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 
		      </td>
		   </tr>
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;void</code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!kaZoomer_zoomOut">kaZoomer_zoomOut</a></b>()
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 
		      </td>
		   </tr>
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;void</code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!kaZoomer_zoomTo">kaZoomer_zoomTo</a></b>( e )
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 
		      </td>
		   </tr>
		
	
	</table>
    <p>

<!-- ========== END METHOD SUMMARY =========== -->


        <pre class="sourceview"><span class="comment">/**********************************************************************
 *
 * $Id: overview-summary-kaZoomer.js.html,v 1.1 2006/03/15 15:56:59 pspencer Exp $
 *
 * purpose: a sliding zoom control intended to be put in the map
 *
 * author: Paul Spencer (pspencer<span class="attrib">@dmsolutions</span>.ca)
 *
 * The original kaZoomer code was written by DM Solutions Group.
 *
 * TODO:
 * 
 **********************************************************************
 *
 * Copyright (c) 2005, DM Solutions Group Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
 * DEALINGS IN THE SOFTWARE.
 *
 **********************************************************************/</span>

<span class="comment">/******************************************************************************
 * kaZoomer
 *
 * class to handle the zoom overlay
 *
 * oKaMap - the ka-Map instance to draw the zoomer on
 *
 *****************************************************************************/</span>
<span class="reserved">function</span> kaZoomer(oKaMap)
{
    <span class="reserved">this</span>.kaMap = oKaMap;
    <span class="comment">//get the viewport</span>
    <span class="reserved">this</span>.domObj = oKaMap.domObj;    
    <span class="comment">//configure slider.</span>
    <span class="reserved">this</span>.nZoomImageHeight = 17;
    
    <span class="reserved">this</span>.opacity = 50;
    
    <span class="reserved">this</span>.left = 3;
    <span class="reserved">this</span>.top = 3;
    <span class="reserved">this</span>.right = null;
    <span class="reserved">this</span>.bottom = null;
    
    <span class="reserved">this</span>.zoomControlObj = null;

    <span class="comment">//prototypes</span>
    <span class="reserved">this</span>.draw = kaZoomer_draw;
    <span class="reserved">this</span>.update = kaZoomer_update;
    
    <span class="reserved">this</span>.kaMap.registerForEvent( KAMAP_MAP_INITIALIZED, <span class="reserved">this</span>, <span class="reserved">this</span>.draw );
}

<span class="reserved">function</span> kaZoomer_setPosition( left, top, right, bottom )
{
    <span class="reserved">this</span>.left = left;
    <span class="reserved">this</span>.top = top;
    <span class="reserved">this</span>.right = right;
    <span class="reserved">this</span>.bottom = bottom;
    
    <span class="reserved">if</span> (<span class="reserved">this</span>.zoomControlObj != null)
    {
        <span class="reserved">if</span> (<span class="reserved">this</span>.left != null)
        {
            oZoomControl.style.left = <span class="reserved">this</span>.left + <span class="literal">'px'</span>;
        }
        <span class="reserved">else</span> <span class="reserved">if</span> (<span class="reserved">this</span>.right != null)
        {
            oZoomControl.style.right = <span class="reserved">this</span>.right + <span class="literal">'px'</span>;
        }
        <span class="reserved">if</span> (<span class="reserved">this</span>.top != null)
        {
            oZoomControl.style.top = <span class="reserved">this</span>.top + <span class="literal">'px'</span>;
        }
        <span class="reserved">else</span> <span class="reserved">if</span> (<span class="reserved">this</span>.bottom != null)
        {
            oZoomControl.style.bottom = <span class="reserved">this</span>.bottom + <span class="literal">'px'</span>;
        }
    }
}

<span class="comment">//handle a map zoom change from another tool</span>
<span class="reserved">function</span> kaZoomer_update()
{
    
    var nThumbHeight = dd.elements.zoomTrack.div.elementHeight;
    var nTrackTop = dd.elements.zoomTrack.y;
    
    var oKaMap = dd.elements.zoomTrack.div.kaZoomer.kaMap;
    var oMap = oKaMap.getCurrentMap();
    var nCurrentScale = parseInt(oMap.currentScale) + 1; <span class="comment">//array is zero based</span>
    var nScales = oMap.getScales().length;
    var nTrackHeight = <span class="reserved">this</span>.nZoomImageHeight * nScales;
    var nPos = (nScales-nCurrentScale)*nThumbHeight;
    dd.elements.zoomThumb.moveTo(dd.elements.zoomThumb.x,nTrackTop + nPos);
}

<span class="comment">//set up the slider UI.</span>
<span class="reserved">function</span> kaZoomer_draw()
{
    <span class="comment">//get scale info for the current map.</span>
    var oMap = <span class="reserved">this</span>.kaMap.getCurrentMap();
    var nScales = oMap.getScales().length;
    var nCurrentScale = oMap.currentScale;
    var nTrackHeight = <span class="reserved">this</span>.nZoomImageHeight * nScales;
    var nTrackMaxPosition = <span class="reserved">this</span>.nZoomImageHeight * (nScales - 1);
    var nInitialPosition = dd.Int(<span class="reserved">this</span>.nZoomImageHeight * 
                                  (nScales - nCurrentScale - 1));
    <span class="comment">//widget images</span>
    var szThumbImg = <span class="literal">'images/slider_button.png'</span>;
    var szTrackTopImg = <span class="literal">'images/slider_tray_top.png'</span>;
    var szTrackBottomImg = <span class="literal">'images/slider_tray_bottom.png'</span>;
    
    <span class="comment">//container div</span>
    <span class="reserved">this</span>.zoomControlObj = document.createElement(<span class="literal">'div'</span>);
    <span class="reserved">this</span>.zoomControlObj.id = <span class="literal">'zoomControl'</span>;
    <span class="reserved">this</span>.zoomControlObj.style.position = <span class="literal">'absolute'</span>;
    <span class="reserved">if</span> (<span class="reserved">this</span>.left != null)
    {
        <span class="reserved">this</span>.zoomControlObj.style.left = <span class="reserved">this</span>.left + <span class="literal">'px'</span>;
    }
    <span class="reserved">else</span> <span class="reserved">if</span> (<span class="reserved">this</span>.right != null)
    {
        <span class="reserved">this</span>.zoomControlObj.style.right = <span class="reserved">this</span>.right + <span class="literal">'px'</span>;
    }
    <span class="reserved">if</span> (<span class="reserved">this</span>.top != null)
    {
        <span class="reserved">this</span>.zoomControlObj.style.top = <span class="reserved">this</span>.top + <span class="literal">'px'</span>;
    }
    <span class="reserved">else</span> <span class="reserved">if</span> (<span class="reserved">this</span>.bottom != null)
    {
        <span class="reserved">this</span>.zoomControlObj.style.bottom = <span class="reserved">this</span>.bottom + <span class="literal">'px'</span>;
    }
    <span class="reserved">this</span>.zoomControlObj.style.width = 17 + <span class="literal">"px"</span>;
    <span class="reserved">this</span>.zoomControlObj.style.height = (nTrackHeight + 2 * <span class="reserved">this</span>.nZoomImageHeight + 6) + <span class="literal">"px"</span>;
    <span class="reserved">this</span>.zoomControlObj.style.opacity = <span class="reserved">this</span>.opacity/100;
    <span class="reserved">this</span>.zoomControlObj.style.mozOpacity = <span class="reserved">this</span>.opacity/100;
    <span class="reserved">this</span>.zoomControlObj.style.filter = <span class="literal">"Alpha(opacity="</span>+<span class="reserved">this</span>.opacity+<span class="literal">")"</span>;    <span class="reserved">this</span>.zoomControlObj.style.cursor = <span class="literal">'auto'</span>;    
    <span class="reserved">this</span>.zoomControlObj.style.zIndex = 300;
    <span class="reserved">this</span>.zoomControlObj.onmouseover = kaZoomer_onmouseover;
    <span class="reserved">this</span>.zoomControlObj.onmouseout = kaZoomer_onmouseout;
    <span class="reserved">this</span>.zoomControlObj.kaZoomer = <span class="reserved">this</span>;
    <span class="reserved">this</span>.kaMap.domObj.appendChild(<span class="reserved">this</span>.zoomControlObj);
    
    <span class="comment">//draw the widget</span>
    var oZoomTrack = document.createElement( <span class="literal">'div'</span> );
    oZoomTrack.id = <span class="literal">'zoomTrack'</span>;
    oZoomTrack.kaZoomer = <span class="reserved">this</span>;
    oZoomTrack.style.position = <span class="literal">'absolute'</span>;
    oZoomTrack.style.left = <span class="literal">'0px'</span>;
    oZoomTrack.style.top = <span class="literal">'20px'</span>;
    oZoomTrack.style.height = parseInt(nTrackHeight) + <span class="literal">'px'</span>;
    oZoomTrack.style.width = <span class="literal">'17px'</span>;
    oZoomTrack.style.backgroundColor = <span class="literal">"#acacac"</span>;
    oZoomTrack.style.backgroundImage = <span class="literal">"url(images/slider_tray_fill.png)"</span>;
    oZoomTrack.elementHeight = <span class="reserved">this</span>.nZoomImageHeight;
    oZoomTrack.onclick = kaZoomer_zoomTo;
    <span class="reserved">this</span>.zoomControlObj.appendChild(oZoomTrack);
    
    var oZoomThumb = document.createElement( <span class="literal">'div'</span> );
    oZoomThumb.id = <span class="literal">'zoomThumb'</span>;
    oZoomThumb.style.position = <span class="literal">'absolute'</span>;
    oZoomThumb.style.height = <span class="literal">'17px'</span>;
    oZoomThumb.style.width = <span class="literal">'17px'</span>;
    oZoomThumb.style.backgroundColor = <span class="literal">"#888888"</span>;
    oZoomThumb.innerHTML = <span class="literal">'&lt;img src="'</span> + szThumbImg +<span class="literal">'" border="0" width="17" height="17"&gt;'</span>;
    <span class="reserved">this</span>.zoomControlObj.appendChild(oZoomThumb);

    var oZoomTrackTop = document.createElement( <span class="literal">'div'</span> );
    oZoomTrackTop.id = <span class="literal">'zoomTrackTop'</span>;
    oZoomTrackTop.style.position = <span class="literal">'absolute'</span>;
    oZoomTrackTop.style.left = <span class="literal">'0px'</span>;
    oZoomTrackTop.style.top = <span class="literal">'17px'</span>;
    oZoomTrackTop.style.width = <span class="literal">'17px'</span>;
    oZoomTrackTop.style.height = <span class="literal">'3px'</span>;
    oZoomTrackTop.innerHTML = <span class="literal">'&lt;img src="'</span> + szTrackTopImg +<span class="literal">'" border="0" width="17" height="3"&gt;'</span>;
    <span class="reserved">this</span>.zoomControlObj.appendChild(oZoomTrackTop);
    
    var oZoomTrackBottom = document.createElement( <span class="literal">'div'</span> );
    oZoomTrackBottom.id = <span class="literal">'zoomTrackBottom'</span>;
    oZoomTrackBottom.style.position = <span class="literal">'absolute'</span>;
    oZoomTrackBottom.style.left = <span class="literal">'0px'</span>;
    oZoomTrackBottom.style.top = 20 + nTrackHeight + <span class="literal">'px'</span>;
    oZoomTrackBottom.style.width = <span class="literal">'17px'</span>;
    oZoomTrackBottom.style.height = <span class="literal">'3px'</span>;
    oZoomTrackBottom.innerHTML = <span class="literal">'&lt;img src="'</span> + szTrackBottomImg +<span class="literal">'" border="0" width="17" height="3"&gt;'</span>;
    <span class="reserved">this</span>.zoomControlObj.appendChild(oZoomTrackBottom);

    <span class="comment">//add +/- labels</span>
    var oZoomIn = document.createElement(<span class="literal">'div'</span>);
    oZoomIn.id = <span class="literal">'zoomIn'</span>;
    oZoomIn.style.position = <span class="literal">'absolute'</span>;
    oZoomIn.style.top = <span class="literal">'0px'</span>;
    oZoomIn.style.left = <span class="literal">'0px'</span>;
    oZoomIn.style.width = <span class="literal">'17px'</span>;
    oZoomIn.style.height = <span class="literal">'17px'</span>;
    oZoomIn.kaZoomer = <span class="reserved">this</span>;
    oZoomIn.onclick = kaZoomer_zoomIn;
    oZoomIn.innerHTML= <span class="literal">"&lt;img src='images/slider_button_zoomin.png' border='0' width='17' height='17'&gt;"</span>;
    <span class="reserved">this</span>.zoomControlObj.appendChild(oZoomIn);

    var oZoomOut = document.createElement(<span class="literal">'div'</span>);
    oZoomOut.id = <span class="literal">'zoomOut'</span>;
    oZoomOut.style.position = <span class="literal">'absolute'</span>;
    oZoomOut.style.top = 23 + nTrackHeight + <span class="literal">'px'</span>;
    oZoomOut.style.left = <span class="literal">'0px'</span>;
    oZoomOut.style.width = <span class="literal">'17px'</span>;
    oZoomOut.style.height = <span class="literal">'17px'</span>;
    oZoomOut.kaZoomer = <span class="reserved">this</span>;
    oZoomOut.onclick = kaZoomer_zoomOut;
    oZoomOut.innerHTML= <span class="literal">"&lt;img src='images/slider_button_zoomout.png' border='0' width='17' height='17'&gt;"</span>;
    <span class="reserved">this</span>.zoomControlObj.appendChild(oZoomOut);

    <span class="comment">//set up drag and drop</span>
    ADD_DHTML(<span class="literal">'zoomThumb'</span>+MAXOFFTOP+0+MAXOFFBOTTOM+nTrackMaxPosition+VERTICAL);
    ADD_DHTML(<span class="literal">'zoomTrack'</span>+NO_DRAG);

    dd.elements.zoomThumb.moveTo(dd.elements.zoomTrack.x, dd.elements.zoomTrack.y + nInitialPosition);
    dd.elements.zoomThumb.setZ(dd.elements.zoomTrack.z+1);

    dd.elements.zoomTrack.addChild(<span class="literal">'zoomThumb'</span>);

    dd.elements.zoomThumb.defx = dd.elements.zoomTrack.x;
    dd.elements.zoomThumb.defy = dd.elements.zoomTrack.y;
    
    dd.elements.zoomThumb.my_DropFunc = kaZoomer_DropFunc;
    
    <span class="reserved">this</span>.kaMap.registerForEvent( KAMAP_SCALE_CHANGED, <span class="reserved">this</span>, <span class="reserved">this</span>.update );
}

<span class="comment">//wz_dragdrop.js overriden function for responding to a release of the slider</span>
<span class="reserved">function</span> kaZoomer_DropFunc()
{
    <span class="comment">//move thumb to closest scale marker</span>
    var nTrackTop = dd.elements.zoomTrack.y;
    
    var nThumbTop = dd.elements.zoomThumb.y - nTrackTop;
    var nThumbHeight = dd.elements.zoomTrack.div.elementHeight;
    
    var nNearestIndex = Math.round(nThumbTop / nThumbHeight);
    dd.elements.zoomThumb.moveTo(dd.elements.zoomThumb.x,nTrackTop +(nNearestIndex*nThumbHeight));

    <span class="comment">//perform zoom</span>
    var oKaMap = dd.elements.zoomTrack.div.kaZoomer.kaMap;
    var oMap = oKaMap.getCurrentMap();
    var nCurrentScale = oMap.getScales()[oMap.aScales.length - nNearestIndex - 1];
    oKaMap.zoomToScale(nCurrentScale);
}

<span class="comment">//zoom to the level clicked in the track</span>
<span class="reserved">function</span> kaZoomer_zoomTo( e )
{
    e = (e)?e:((event)?event:null);
    var nClickTop = (e.layerY)?e.layerY:e.offsetY;
    <span class="comment">//find current track height</span>
    var oKaZoomer = dd.elements.zoomTrack.div.kaZoomer;
    var oKaMap = oKaZoomer.kaMap;
    var oMap = oKaMap.getCurrentMap();
    var nScales = oMap.getScales().length;
    var nTrackHeight = dd.Int(oKaZoomer.nZoomImageHeight) * nScales;
    
    <span class="comment">//zoome to closest scale</span>
    var nNearestIndex = Math.floor(nClickTop / nTrackHeight * nScales);
    var nNewScale = oMap.getScales()[oMap.aScales.length - nNearestIndex - 1];
    oKaMap.zoomToScale(nNewScale);
}

<span class="reserved">function</span> kaZoomer_onmouseover( e )
{
    <span class="reserved">this</span>.style.opacity = 1;
    <span class="reserved">this</span>.style.mozOpacity = 1;
    <span class="reserved">this</span>.style.filter = <span class="literal">"Alpha(opacity=100)"</span>;
}

<span class="reserved">function</span> kaZoomer_onmouseout( e )
{
    <span class="reserved">this</span>.style.opacity = <span class="reserved">this</span>.kaZoomer.opacity/100;
    <span class="reserved">this</span>.style.mozOpacity = <span class="reserved">this</span>.kaZoomer.opacity/100;
    <span class="reserved">this</span>.style.filter = <span class="literal">"Alpha(opacity="</span>+<span class="reserved">this</span>.kaZoomer.opacity+<span class="literal">")"</span>;
}

<span class="reserved">function</span> kaZoomer_zoomIn()
{
    <span class="reserved">this</span>.kaZoomer.kaMap.zoomIn();
}

<span class="reserved">function</span> kaZoomer_zoomOut()
{
    <span class="reserved">this</span>.kaZoomer.kaMap.zoomOut();
}

<span class="reserved">function</span> kaZoomer_alert()
{
    alert(<span class="literal">'here'</span>);
}
</pre>
	<hr>



<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
  <tr align="center" valign="top">
  
  
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
  <td bgcolor="#FFFFFF" class="NavBarCell1Rev">	&nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
  

  <td bgcolor="#FFFFFF" class="NavBarCell1"> <font class="NavBarFont1">Class</font>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
  </tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top"><em>
<b>ka-Map</b></em>
</td>
</tr>

<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
  <a href="index.html" target="_top"><b>FRAMES</b></a>  &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->

<hr>
<font size="-1">

</font>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Wed Mar 15 10:50:59 2006</div>
</body>
</html>
